﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Koopakiller.Numerics.FormulaSolver
{
    /// <summary>
    /// Provides data for the <see cref="Koopakiller.Numerics.FormulaSolver.FormulaCalculator.FormulaSplit"/> event.
    /// </summary>
    public sealed class FormulaSplitEventArgs : EventArgs
    {
        /// <summary>
        /// Gets the identifier of the formula.
        /// </summary>
        public FormulaIdentifier Identifier { get; private set; }
        /// <summary>
        /// Gets the symbol of the result of the formula.
        /// </summary>
        public string ValueSymbol { get; private set; }
        /// <summary>
        /// Gets a <see cref="FormulaSolver"/> with the new values.
        /// </summary>
        public FormulaCalculator NewValues { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="FormulaSplitEventArgs"/> class.
        /// </summary>
        /// <param name="identifier">The identifier of the formula.</param>
        /// <param name="valueSymbol">The symbol of the result of the formula.</param>
        /// <param name="newValues">The new (second) values after calculating the formula.</param>
        internal FormulaSplitEventArgs(FormulaIdentifier identifier, string valueSymbol, FormulaCalculator newValues)
        {
            this.Identifier = identifier;
            this.ValueSymbol = valueSymbol;
            this.NewValues = newValues;
        }
    }
}
